<?php

namespace App\Model;

use Illuminate\Database\Eloquent\Model;

class Table extends Model
{
    //
    protected $table = 'table';
    public $timestamps = false;
    protected $primaryKey = "id";
    protected $guarded = ['id'];

    /**
     * @param $role_id:角色id
     * @param $table_id:表ID
     * @return mixed
     */
    public static function access($role_id,$table_id)
    {
        $res = self::where('role_id',$role_id)->where('table_id',$table_id)->first();
        return $res;
    }
}
